#ifndef DIGITALCONFIG_H
#define DIGITALCONFIG_H

/**********debug消息************/
#define IS_FILTER_DEBUGMESSAGE false
#define IS_DEBUGTEXT_ONLYNOWPLAYER true
#define REPRESENT_BOARDCAST_MESSAGE -1


/**********地图可见性设置************/
#define MAP_EXPLORE true
#define MAP_VISIABLE true
//#define MAP_EXPLORE false
//#define MAP_VISIABLE false


/**********玩家初始资源设置************/
#define INITIAL_WOOD 200
#define INITIAL_MEAT 200
#define INITIAL_STONE 150
#define INITIAL_GOLD 0


/********** 碰撞箱大小 **********/
#define CRASHBOX_SINGLEBLOCK 16.36
#define CRASHBOX_SMALLBLOCK 34.21
#define CRASHBOX_SMALL 32.72
#define CRASHBOX_MIDDLE 50.57
#define CRASHBOX_BIG 68.42
#define CRASHBOX_SINGLEOB 5.96
#define CRASHBOX_SMALLOB 8.925
#define CRASHBOX_BIGOB 17.7


/********** 建筑属性相关设置 **********/
/********** 建筑动作耗时 **********/  //单位为秒
/********** 行动消耗资源 **********/
/**市政中心**/
#define BLOOD_BUILD_CENTER 600
#define VISION_CENTER 4
#define BUILD_CENTER_WOOD 200
#define TIME_BUILD_CENTER 60
//生产村民
#define BUILDING_CENTER_CREATEFARMER_FOOD 50
#define TIME_BUILDING_CENTER_CREATEFARMER 20
//升级时代至工具时代
#define BUILDING_CENTER_UPGRADE_FOOD 500
#define TIME_BUILDING_CENTER_UPGRADE 60

/**房子**/
#define BLOOD_BUILD_HOUSE 75
#define VISION_HOME 4
#define BUILD_HOUSE_WOOD 30
#define TIME_BUILD_HOME 20

/**仓库**/
#define BLOOD_BUILD_STOCK 350
#define VISION_STOCK 4
#define BUILD_STOCK_WOOD 120
#define TIME_BUILD_STOCK 30
//升级工具利用（1级）
#define BUILDING_STOCK_UPGRADE_USETOOL_FOOD 100
#define TIME_BUILDING_STOCK_UPGRADE_USETOOL 40
#define BUILDING_STOCK_UPGRADE_USETOOL_ADDITION_ATKCLOSE 2
//升级步兵护甲（1级）
#define BUILDING_STOCK_UPGRADE_DEFENSE_INFANTRY_FOOD 75
#define TIME_BUILDING_STOCK_UPGRADE_DEFENSE_INFANTRY 40
#define BUILDING_STOCK_UPGRADE_DEFENSE_INFANTRY_ADDITION_DEFENSE_INFANTRY 2
//升级弓兵护甲（1级）
#define BUILDING_STOCK_UPGRADE_DEFENSE_ARCHER_FOOD 100
#define TIME_BUILDING_STOCK_UPGRADE_DEFENSE_ARCHER 40
#define BUILDING_STOCK_UPGRADE_DEFENSE_ARCHER_ADDITION_DEFENSE_ARCHER 2
//升级骑兵护甲（1级）
#define BUILDING_STOCK_UPGRADE_DEFENSE_RIDER_FOOD 125
#define TIME_BUILDING_STOCK_UPGRADE_DEFENSE_RIDER 30
#define BUILDING_STOCK_UPGRADE_DEFENSE_RIDER_ADDITION_DEFENSE_RIDER 2

/**谷仓**/
#define BLOOD_BUILD_GRANARY 350
#define VISION_GRANARY 4
#define BUILD_GRANARY_WOOD 120
#define TIME_BUILD_GRANARY 30
//研发箭塔
#define BUILDING_GRANARY_ARROWTOWER_FOOD 50
#define TIME_BUILDING_GRANARY_RESEARCH_ARROWTOWER 10
//研发城墙
#define BUILDING_GRANARY_RESEARCH_WALL_FOOD 50
#define TIME_BUILDING_GRANARY_RESEARCH_WALL 10

/**兵营**/
#define BLOOD_BUILD_ARMYCAMP 350
#define VISION_ARMYCAMP 4
#define BUILD_ARMYCAMP_WOOD 125
#define TIME_BUILD_ARMYCAMP 30
//生产棍棒兵
#define BUILDING_ARMYCAMP_CREATE_CLUBMAN_FOOD 50
#define TIME_BUILDING_ARMYCAMP_CREATE_CLUBMAN 26
//升级棍棒兵为斧头兵
#define BUILDING_ARMYCAMP_UPGRADE_CLUBMAN_FOOD 100
#define TIME_BUILDING_ARMYCAMP_UPGRADE_CLUBMAN 40
//生产投石者
#define BUILDING_ARMYCAMP_CREATE_SLINGER_FOOD 40
#define BUILDING_ARMYCAMP_CREATE_SLINGER_STONE 10
#define TIME_BUILDING_ARMYCAMP_CREATE_SLINGER 24

/**靶场**/
#define BLOOD_BUILD_RANGE 350
#define VISION_RANGE 4
#define BUILD_RANGE_WOOD 150
#define TIME_BUILD_RANGE 40
//生产弓箭手
#define BUILDING_RANGE_CREATE_BOWMAN_FOOD 40
#define BUILDING_RANGE_CREATE_BOWMAN_WOOD 20
#define TIME_BUILDING_RANGE_CREATE_BOWMAN 30

/**马厩**/
#define BLOOD_BUILD_STABLE 350
#define VISION_STABLE 4
#define BUILD_STABLE_WOOD 150
#define TIME_BUILD_STABLE 40
//生产侦察骑兵
#define BUILDING_STABLE_CREATE_SCOUT_FOOD 60
#define TIME_BUILDING_STABLE_CREATE_SCOUT 30

/**市场**/
#define BLOOD_BUILD_MARKET 350
#define VISION_MARKET 4
#define BUILD_MARKET_WOOD 150
#define TIME_BUILD_MARKET 40

/**船坞**/
#define BLOOD_BUILD_DOCK 350
#define VISION_DOCK 4
#define BUILD_DOCK_WOOD 120
#define TIME_BUILD_DOCK 40
/**生产战船**/
#define BUILDING_DOCK_CREATE_SHIP_WOOD 60
#define TIME_BUILDING_DOCK_CREATE_SHIP 30
/**生产渔船**/
#define BUILDING_DOCK_CREATE_SAILING_WOOD 60
#define TIME_BUILDING_DOCK_CREATE_SAILING 30
/**生产运输船**/
#define BUILDING_DOCK_CREATE_WOOD_BOAT_WOOD 60
#define TIME_BUILDING_DOCK_CREATE_WOOD_BOAT 30
//升级伐木（1级）
#define BUILDING_MARKET_WOOD_UPGRADE_FOOD 120
#define BUILDING_MARKET_WOOD_UPGRADE_WOOD 75
#define TIME_BUILDING_MARKET_UPGRADE_CUTTING 40
#define BUILDING_MARKET_WOOD_UPGRADE_ADDITION_CARRY 2
#define BUILDING_MARKET_WOOD_UPGRADE_ADDITION_GATHERRATE 0.2
#define BUILDING_MARKET_WOOD_UPGRADE_ADDITION_DISSHOOT 1

//升级采集石头（1级）
#define BUILDING_MARKET_STONE_UPGRADE_FOOD 100
#define BUILDING_MARKET_STONE_UPGRADE_STONE 50
#define TIME_BUILDING_MARKET_UPGRADE_DIGGINGSOTNE 60
#define BUILDING_MARKET_STONE_UPGRADE_ADDITION_CARRY 3
#define BUILDING_MARKET_STONE_UPGRADE_ADDITION_GATHERRATE 0.2
#define BUILDING_MARKET_STONE_UPGRADE_ADDITION_SILNGERATK 1
#define BUILDING_MARKET_STONE_UPGRADE_ADDITION_SILNGERDIS 1

//升级金矿开采（1级）
#define BUILDING_MARKET_GOLD_UPGRADE_FOOD 120
#define BUILDING_MARKET_GOLD_UPGRADE_WOOD 100
#define TIME_BUILDING_MARKET_UPGRADE_GOLD 60
#define BUILDING_MARKET_GOLD_UPGRADE_ADDITION_CARRY 3
#define BUILDING_MARKET_GOLD_UPGRADE_ADDITION_GATHERRATE 0.2

//升级农田（1级）
#define BUILDING_MARKET_FARM_UPGRADE_FOOD 200
#define BUILDING_MARKET_FARM_UPGRADE_WOOD 50
#define TIME_BUILDING_MARKET_UPGRADE_FARM 60
#define BUILDING_MARKET_FARM_UPGRADE_ADDITION_FOOD 75


/**农场**/
#define BLOOD_BUILD_FARM 50
#define CNT_BUILD_FARM 250
#define VISION_FARM 4
#define BUILD_FARM_WOOD 75
#define TIME_BUILD_FARM 30
/**箭塔**/
#define BLOOD_BUILD_ARROWTOWER 125
#define VISION_ARROWTOWER 10
#define DIS_BUILD_ARROWTOWER 5
#define ATK_BUILD_ARROWTOWER 3
#define DEFSHOOT_BUILD_ARROWTOWER 2
#define BUILD_ARROWTOWER_STONE 150
#define TIME_BUILD_ARROWTOWER 80

/**城墙**/
#define BLOOD_BUILD_WALL 200
#define DEFSHOOT_BUILD_WALL 3
#define BUILD_WALL_STONE 5
#define TIME_BUILD_WALL 10


/********** 距离常量 **********/
#define DISTANCE_Manhattan_MoveEndNEAR 0.0001
#define DISTANCE_Manhattan_PathMove 0.01
#define DISTANCE_Manhattan_Unload (BLOCKSIDELENGTH*1.2)
#define DISTANCE_Manhattan_Transport (DISTANCE_Manhattan_Unload*1.2)
#define DISTANCE_ATTACK_CLOSE (8*gen5)
#define DISTANCE_ATTACK_CLOSE_BIGOB (15*gen5)
#define DISTANCE_HIT_TARGET 4
//箭塔攻击距离
#define DIS_ARROWTOWER 7


/********** 攻击方式 **********/
#define ATTACKTYPE_CANTATTACK -1
#define ATTACKTYPE_ANIMAL 0
#define ATTACKTYPE_CLOSE 1
#define ATTACKTYPE_CLOSE_TOTREE 11
#define ATTACKTYPE_SHOOT 2
//转化
#define ATTACKTYPE_CHANGE 3
//投石车
#define ATTACKTYPE_CATAPULT 4
//弩炮
#define ATTACKTYPE_BALISTA 5


/********** 军队类别 **********/
//步兵
#define ARMY_INFANTRY 1
//弓兵
#define ARMY_ARCHER 3
//骑兵
#define ARMY_RIDER 4
//祭
#define ARMY_FLAMEN 5
//攻城兵器
#define ARMY_SIEGE 6
//船
#define ARMY_SHIP 7


/********** 兵种类别 **********/
#define AT_CLUBMAN 0
#define AT_SLINGER 1
#define AT_SWORDSMAN 4

//#define AT_HOPLITE 3

#define AT_BOWMAN 2
#define AT_IMPROVED 5
//#define AT_CHARIOTARCHER 6
//#define AT_HORSE 7
//#define AT_ELEPHENTARCHER 8

#define AT_SCOUT 3
#define AT_CAVALRY 6
//#define AT_CAMEL 11
//#define AT_CHARIOT 12
//#define AT_ELEPHENT 13

#define AT_SHIP 7
/********** 祭祀 **********/
#define AT_PRIEST 51


/********** 攻城工具 **********/
#define AT_THROWER 61
#define AT_BALLISTA 62


/********** 船类别 **********/
#define SHIP_FISHING 71
#define SHIP_TRADE 73
#define SHIP_TRANSPORT 72
#define SHIP_SCOUT 74
#define SHIP_FIRE 75
#define SHIP_CATAPUL 76
#define SHIP_JUGGERNAUT 77
/***********船可以和人互动的最大距离(平方)*********/
#define SHIP_ACT_MAX_DISTANCE (DISTANCE_Manhattan_Unload*DISTANCE_Manhattan_Unload)
/***********农民类型**********/
#define FARMERTYPE_FARMER 0
#define FARMERTYPE_WOOD_BOAT 1
#define FARMERTYPE_SAILING 2

/************士兵属性**************/
//棍棒手
#define BLOOD_CLUBMAN1 40
//村民表格中速度为1.1,设置为gen(5)
#define SPEED_CLUBMAN1 (1.2/1.1*HUMAN_SPEED)
#define VISION_CLUBMAN1 4
#define DIS_CLUBMAN1 0
#define INTERVAL_CLUBMAN1 1.5
#define ATK_CLUBMAN1 3
#define DEFCLOSE_CLUBMAN1 0
#define DEFSHOOT_CLUBMAN1 0

//刀斧手
#define BLOOD_CLUBMAN2 50
#define SPEED_CLUBMAN2 (1.2/1.1*HUMAN_SPEED)
#define VISION_CLUBMAN2 4
#define DIS_CLUBMAN2 0
#define INTERVAL_CLUBMAN2 1.5
#define ATK_CLUBMAN2 5
#define DEFCLOSE_CLUBMAN2 0
#define DEFSHOOT_CLUBMAN2 0

//短剑手
#define BLOOD_SHORTSWORDSMAN1 150
#define SPEED_SHORTSWORDSMAN1 (1.2/1.1*HUMAN_SPEED)
#define VISION_SHORTSWORDSMAN1 4
#define DIS_SHORTSWORDSMAN1 0
#define INTERVAL_SHORTSWORDSMAN1 1.5
#define ATK_SHORTSWORSMAN1 9
#define DEFCLOSE_SHORTSWORSMAN1 1
#define DEFSHOOT_SHORTSWORSMAN1 0

//阔剑手
#define BLOOD_SHORTSWORDSMAN2 70
#define SPEED_SHORTSWORDSMAN2 (1.2/1.1*HUMAN_SPEED)
#define VISION_SHORTSWORDSMAN2 4
#define DIS_SHORTSWORDSMAN2 0
#define INTERVAL_SHORTSWORDSMAN2 1.5
#define ATK_SHORTSWORSMAN2 9
#define DEFCLOSE_SHORTSWORSMAN2 1
#define DEFSHOOT_SHORTSWORSMAN2 0

//长剑手
#define BLOOD_SHORTSWORDSMAN3 80
#define SPEED_SHORTSWORDSMAN3 (1.2/1.1*HUMAN_SPEED)
#define VISION_SHORTSWORDSMAN3 4
#define DIS_SHORTSWORDSMAN3 0
#define INTERVAL_SHORTSWORDSMAN3 1.5
#define ATK_SHORTSWORSMAN3 11
#define DEFCLOSE_SHORTSWORSMAN3 2
#define DEFSHOOT_SHORTSWORSMAN3 0

//铁甲步兵
#define BLOOD_SHORTSWORDSMAN4 160
#define SPEED_SHORTSWORDSMAN4 (1.2/1.1*HUMAN_SPEED)
#define VISION_SHORTSWORDSMAN4 4
#define DIS_SHORTSWORDSMAN4 0
#define INTERVAL_SHORTSWORDSMAN4 1.5
#define ATK_SHORTSWORSMAN4 13
#define DEFCLOSE_SHORTSWORSMAN4 2
#define DEFSHOOT_SHORTSWORSMAN4 0

//投石者
#define BLOOD_SLINGER 25
#define SPEED_SLINGER (1.2/1.1*HUMAN_SPEED)
#define VISION_SLINGER 5
#define DIS_SLINGER 4
#define INTERVAL_SLINGER 1.5
#define ATK_SLINGER 2
#define DEFCLOSE_SLINGER 0
#define DEFSHOOT_SLINGER 2

//弓箭手
#define BLOOD_BOWMAN 35
#define SPEED_BOWMAN (1.2/1.1*HUMAN_SPEED)
#define VISION_BOWMAN 7
#define DIS_BOWMAN 5
#define INTERVAL_BOWMAN 1.4
#define ATK_BOWMAN 3
#define DEFCLOSE_BOWMAN 0
#define DEFSHOOT_BOWMAN 0

//长弓手
#define BLOOD_IMPROVEDBOWMAN1 120
#define SPEED_IMPROVEDBOWMAN1 (1.2/1.1*HUMAN_SPEED)
#define VISION_IMPROVEDBOWMAN1 8
#define DIS_IMPROVEDBOWMAN1 6
#define INTERVAL_IMPROVEDBOWMAN1 1.4
#define ATK_IMPROVEDBOWMAN1 8
#define DEFCLOSE_IMPROVEDBOWMAN1 0
#define DEFSHOOT_IMPROVEDBOWMAN1 0

//十字弓手
#define BLOOD_IMPROVEDBOWMAN2 45
#define SPEED_IMPROVEDBOWMAN2 (1.2/1.1*HUMAN_SPEED)
#define VISION_IMPROVEDBOWMAN2 9
#define DIS_IMPROVEDBOWMAN2 7
#define INTERVAL_IMPROVEDBOWMAN2 1.4
#define ATK_IMPROVEDBOWMAN2 5
#define DEFCLOSE_IMPROVEDBOWMAN2 0
#define DEFSHOOT_IMPROVEDBOWMAN2 0

//侦察骑兵
#define BLOOD_SCOUT 80
#define SPEED_SCOUT (2/1.1*HUMAN_SPEED)
#define VISION_SCOUT 8
#define DIS_SCOUT 0
#define INTERVAL_SCOUT 1.5
#define ATK_SCOUT 5
#define DEFCLOSE_SCOUT 0
#define DEFSHOOT_SCOUT 0

//骑兵
#define BLOOD_CAVALRY 150
#define SPEED_CAVALRY (2/1.1*HUMAN_SPEED)
#define VISION_CAVALRY 4
#define DIS_CAVALRY 0
#define INTERVAL_CAVALRY 1.5
#define ATK_CAVALRY 8
#define DEFCLOSE_CAVALRY 0
#define DEFSHOOT_CAVALRY 0
//战船
#define BLOOD_SHIP 300
#define SPEED_SHIP (2/1.1*HUMAN_SPEED)
#define VISION_SHIP 4
#define ATK_SHIP 20
#define DIS_SHIP 10
#define INTERVAL_SHIP 1.4
#define DEFCLOSE_SHIP 0
#define DEFSHOOT_SHIP 0
/********** 飞行物投掷判断 **********/
#define THROWMISSION_FARMER 25
#define THROWMISSION_ARCHER 4
#define THROWMISSION_IMPROVEDBOWMAN1 4

#define THROWMISSION_SLINGER 5

#define THROWMISSION_ARROWTOWN_TIMER 25


/********** 飞行物类别 **********/
#define Missile_Spear 0
#define Missile_Arrow 1
#define Missile_Cobblestone 2


/********** 飞行物属性 **********/
#define Missile_Speed_Spear (4*HUMAN_SPEED)
#define Missile_Speed_Arrow (9*HUMAN_SPEED)
#define Missile_Speed_Cobblestone (9*HUMAN_SPEED)


/********** 设置多少帧切换一次nowres **********/
#define NOWRES_TIMER_FARMER 1
#define NOWRES_TIMER_CLUBMAN 1
#define NOWRES_TIMER_BOWMAN 2
#define NOWRES_TIMER_IMPROVEDBOWMAN1 2
#define NOWRES_TIMER_SCOUT 2
#define NOWRES_TIMER_CAVALRY 2
#define NOWRES_TIMER_SLINGER 1
#define NOWRES_TIMER_SWORSMAN 1
#define NOWRES_TIMER_LION 1
#define NOWRES_TIMER_ELEPHANT 1


#endif // DIGITALCONFIG_H
